import request from '/@/utils/request'
/**
 * 聊天模块接口
 * @method ServeGetTalkList 获取聊天列表服务接口
 * @method ServeGroupDetail 获取群信息服务接口
 * @method ServeGetGroupMembers 获取群组成员列表
 * @method ServeGetInviteFriends 获取用户可邀请加入群组的好友列表
 * @method ServeCreateGroup 创建群聊服务接口
 * @method ServeInviteGroup 邀请好友加入群聊服务接口
 * @method ServeSecedeGroup 用户退出群聊服务接口
 * @method ServeClearTalkUnreadNum 清除聊天消息未读数服务接口
 * @method ServeTopTalkList 对话列表置顶服务接口
 * @method ServeSetNotDisturb 对话免打扰
 * @method ServeDeleteTalkList 移除会话
 * @method ServeDeleteContact 解除好友关系服务接口
 * @method ServeSearchContact 搜索联系人
 * @method ServeTalkRecords 获取聊天记录服务接口
 * @method ServeSendTalkText 发送文本消息服务接口
 * @method ServeCreateTalkList 聊天列表创建服务模块
 * @method ServeSendTalkCodeBlock 发送代码块消息服务接口
 * @method ServeSendTalkImage 发送聊天图片服务接口
 * @method ServeFindFileSplitInfo 查询大文件拆分信息服务接口
 * @method ServeFileSubareaUpload 文件拆分上传服务接口
 * @method ServeSendTalkFile 发送聊天文件服务接口
 * @method ServeSendVote 发送投票信息
 * @method ServeConfirmVoteHandle 成员进行投票
 * @method ServeCreateContact 好友申请服务接口
 * @method ServeGetContacts 获取好友列表服务接口
 * @method ServeGetGroups 查询用户群聊服务接口
 * @method ServeSearchUser  搜索用户信息服务接口
 * @method ServeGetContactApplyRecords 查询好友申请服务接口
 * @method ServeApplyAccept 通过好友申请服务接口
 * @method ServeApplyDecline 拒绝好友申请服务接口
 * @method ServeFindTalkRecords 聊天历史记录
 * @method ServeUploadAvatar 图片上传
 * @method ServeRemoveMembersGroup 移除群聊成员服务接口
 * @method ServeEditGroupNotice 编辑群公告
 * @method ServeForwardRecords 转发消息服务接口
 * @method ServeGetForwardRecords 获取转发会话记录详情列表服务接口
 * @method ServeUpdateGroupCard 修改群聊名片服务接口
 * @method ServeGetGroupNotices 获取群组公告列表
 * @method ServeEditGroup 修改群信息
 * @method ServeEditContactRemark 修改好友备注服务接口
 * @method ServeRevokeRecords 撤回消息服务接口
 * @method ServeRemoveRecords 删除消息服务接口
 * @method ServeDismissGroup 管理员解散群聊服务接口
 * @method pmsSpuCommentpageList 商品列表
 * @method skuInfo 发送商品消息
 * @method SpoorpageList 获取用户足迹列表
 * @method orderText 发送订单消息
 *
 */
export function useChatApi() {
    return {
        ServeGetTalkList: (params?:object) => {
            return request({
				url: '/imApi/talk/list',
				method: 'get',
				params,
			})
        },
        ServeGroupDetail: (params?:object) => {
            return request({
                url: '/imApi/group/detail',
                method: 'get',
                params
            })
        },
        ServeGetGroupMembers: (params?:object) => {
            return request({
                url: '/imApi/group/member/list',
                method: 'get',
                params
            })
        },
        ServeGetInviteFriends: (params?:object) => {
            return request({
                url: '/imApi/group/member/invites',
                method: 'get',
                params
            })
        },
        ServeCreateGroup: (params?:object) => {
            return request({
                url: '/imApi/group/create',
                method: 'post',
                data: params
            })
        },
        ServeInviteGroup: (params?:object) => {
            return request({
                url: '/imApi/group/invite',
                method: 'post',
                data: params
            })
        },
        ServeSecedeGroup: (params?:object) => {
            return request({
                url: '/imApi/group/secede',
                method: 'post',
                data: params
            })
        },
        ServeClearTalkUnreadNum: (params?:object) => {
            return request({
                url: '/imApi/talk/unread/clear',
                method: 'post',
                data: params
            })
        },
        ServeTopTalkList: (params?:object) => {
            return request({
                url: '/imApi/talk/topping',
                method: 'post',
                data: params
            })
        },
        ServeSetNotDisturb: (params?:object) => {
            return request({
                url: '/imApi/talk/disturb',
                method: 'post',
                data: params
            })
        },
        ServeDeleteTalkList: (params?:object) => {
            return request({
                url: '/imApi/talk/delete',
                method: 'post',
                data: params
            })
        },
        ServeDeleteContact: (params?:object) => {
            return request({
                url: '/imApi/contact/delete',
                method: 'post',
                data: params
            })
        },
        ServeSearchContact: (params?:object) => {
            return request({
                url: '/imApi/contact/search',
                method: 'get',
                params
            })
        },
        ServeTalkRecords: (params?:object) => {
            return request({
                url: '/imApi/talk/records',
                method: 'get',
                params
            })
        },
        ServeSendTalkText: (params?:object) => {
            return request({
                url: '/imApi/talk/message/text',
                method: 'post',
                data: params
            })
        },
        ServeCreateTalkList: (params?:object) => {
            return request({
                url: '/imApi/talk/create',
                method: 'post',
                data: params
            })
        },
        ServeSendTalkCodeBlock: (params?:object) => {
            return request({
                url: '/imApi/talk/message/code',
                method: 'post',
                data: params
            })
        },
        ServeSendTalkImage: (params?:object) => {
            return request({
                url: '/imApi/talk/message/image',
                method: 'post',
                data: params
            })
        },
        ServeFindFileSplitInfo: (params?:object) => {
            return request({
                url: '/imApi/upload/multipart/initiate',
                method: 'post',
                data: params
            })
        },
        ServeFileSubareaUpload: (params?:object) => {
            return request({
                url: '/imApi/upload/multipart',
                method: 'post',
                data: params
            })
        },
        ServeSendTalkFile: (params?:object) => {
            return request({
                url: '/imApi/talk/message/file',
                method: 'post',
                data: params
            })
        },
        ServeSendVote: (params?:object) => {
            return request({
                url: '/imApi/talk/message/vote',
                method: 'post',
                data: params
            })
        },
        ServeConfirmVoteHandle: (params?:object) => {
            return request({
                url: '/imApi/talk/message/vote/handle',
                method: 'post',
                data: params
            })
        },
        ServeCreateContact: (params?:object) => {
            return request({
                url: '/imApi/contact/apply/create',
                method: 'post',
                data: params
            })
        },
        ServeGetContacts: (params?:object) => {
            return request({
                url: '/imApi/contact/list',
                method: 'get',
                params
            })
        },
        ServeGetGroups: (params?:object) => {
            return request({
                url: '/imApi/group/list',
                method: 'get',
                params
            })
        },
        ServeSearchUser: (params?:object) => {
            return request({
                url: '/imApi/contact/detail',
                method: 'get',
                params
            })
        },
        ServeGetContactApplyRecords: (params?:object) => {
            return request({
                url: '/imApi/contact/apply/records',
                method: 'get',
                params
            })
        },
        ServeApplyAccept: (params?:object) => {
            return request({
                url: '/imApi/contact/apply/accept',
                method: 'post',
                data: params
            })
        },
        ServeApplyDecline: (params?:object) => {
            return request({
                url: '/imApi/contact/apply/decline',
                method: 'post',
                data: params
            })
        },
        ServeFindTalkRecords: (params?:object) => {
            return request({
                url: '/imApi/talk/records/history',
                method: 'get',
                params
            })
        },
        ServeUploadAvatar: (params?:object) => {
            return request({
                url: '/imApi/upload/avatar',
                method: 'post',
                data: params
            })
        },
        ServeRemoveMembersGroup: (params?:object) => {
            return request({
                url: '/imApi/group/member/remove',
                method: 'post',
                data: params
            })
        },
        ServeEditGroupNotice: (params?:object) => {
            return request({
                url: '/imApi/group/notice/edit',
                method: 'post',
                data: params
            })
        },
        ServeForwardRecords: (params?:object) => {
            return request({
                url: '/imApi/talk/message/forward',
                method: 'post',
                data: params
            })
        },
        ServeGetForwardRecords: (params?:object) => {
            return request({
                url: '/imApi/talk/records/forward',
                method: 'get',
                params
            })
        },
        ServeUpdateGroupCard: (params?:object) => {
            return request({
                url: '/imApi/group/member/remark',
                method: 'post',
                data: params
            })
        },
        ServeGetGroupNotices: (params?:object) => {
            return request({
                url: '/imApi/group/notice/list',
                method: 'get',
                params
            })
        },
        ServeEditGroup: (params?:object) => {
            return request({
                url: '/imApi/group/setting',
                method: 'post',
                data: params
            })
        },
        ServeEditContactRemark: (params?:object) => {
            return request({
                url: '/imApi/contact/editRemark',
                method: 'post',
                data: params
            })
        },
        ServeRevokeRecords: (params?:object) => {
            return request({
                url: '/imApi/talk/message/revoke',
                method: 'post',
                data: params
            })
        },
        ServeRemoveRecords: (params?:object) => {
            return request({
                url: '/imApi/talk/message/delete',
                method: 'post',
                data: params
            })
        },
        ServeDismissGroup: (params?:object) => {
            return request({
                url: '/imApi/group/dismiss',
                method: 'post',
                data: params
            })
        },
        pmsSpuCommentpageList: (params?:object) => {
            return request({
                url: '/pms/pmsSpuInfo/getGoods',
                method: 'post',
                data: params
            })
        },
        skuInfo: (params?:object) => {
            return request({
                url: '/imApi/talk/message/skuInfo',
                method: 'post',
                data: params
            })
        },
        SpoorpageList: (params?:object) => {
            return request({
                url: '/ums/umsMemberSpoor/pageList',
                method: 'post',
                data: params
            })
        },
        orderText: (params?:object) => {
            return request({
                url: '/imApi/talk/message/orderInfo',
                method: 'post',
                data: params
            })
        },

        getNowLoginSetting: () => {
            return request({
                url: '/imApi/talkSetting/getNowLoginSetting',
                method: 'get'
            })
        },

        updateSetting: (params?:object) => {
            return request({
                url: '/imApi/talkSetting/update',
                method: 'post',
                data: params
            })
        },


        //客服等级设置
        userCustomerServiceLevelList: (params?:object) => {
            return request({
                url: '/imApi/userCustomerServiceLevel/queryList',
                method: 'get',
                params: params
            })
        },

        userCustomerServiceLeveCreate: (params?:object) => {
            return request({
                url: '/imApi/userCustomerServiceLevel/create',
                method: 'post',
                data: params
            })
        },

        userCustomerServiceLevelUpdate: (params?:object) => {
            return request({
                url: '/imApi/userCustomerServiceLevel/update',
                method: 'post',
                data: params
            })
        },

        userCustomerServiceLevelRemove: (id) => {
            return request({
                url: '/imApi/userCustomerServiceLevel/remove/'+id,
                method: 'get'
            })
        },

        userCustomerServiceLevelList2: () => {
            return request({
                url: '/imApi/userCustomerServiceLevel/getList',
                method: 'get'
            })
        },

        //客服列表
        userShopRelationlList: (params?:object) => {
            return request({
                url: '/imApi/userShopRelation/queryList',
                method: 'get',
                params: params
            })
        },
        //获取模块列表
        getModuleList: () => {
            return request({
                url: '/imApi/users/getModuleList',
                method: 'get'
            })
        },
    }
}
